#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

struct Fruit
{
	string name;
	float price;
	Fruit(const string& name, const float& price): name(name), price(price)
	{}
};

void push(vector<Fruit>& fruit)
{
	string name;
	float price;
	cin>> name;
	cin>>price;
	fruit.push_back(Fruit(name, price));
}

bool compare(const Fruit& fruit1, const Fruit& fruit2)
{
	return fruit1.price > fruit2.price;
}

struct Compare{
	bool operator()(const Fruit& other1, const Fruit& other2)
	{
		return other1.price > other2.price;
	}
};

void print(const vector<Fruit>& fruit)
{
	vector<Fruit>::const_iterator it = fruit.begin();
	for(; it != fruit.end(); )
	{
		cout<<"Fruit: "<<it->name<<" Price:"<< it->price <<endl;
		++it;
	}
}

int main(int argc, char **argv)
{
	vector<Fruit> fruit;
	int i(0);
	for(; i < 5; ++i)
	{
		push(fruit);
	}
	sort(fruit.begin(), fruit.end(), compare);
	print(fruit);
	return 0;
}

